package com.qst.Serviceimpl;

import com.qst.Service.AdminService;
import com.qst.Vo.AdminVo;
import com.qst.dao.AdminMapper;
import com.qst.pojo.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @packageName:com.qst.Serviceimpl
 * @className:AdminServiceimpl
 * @Description:
 * @author:zhangyu
 * @date 2021/6/23 7:52
 **/

@Service
public class AdminServiceimpl implements AdminService {

    @Autowired
    AdminMapper adminMapper;

    @Override
    public List<Admin> findAdminbyname(String loginname) {
        return adminMapper.findAdminbyname(loginname);
    }

    @Override
    public int updateAdmin(Admin admin) {

        return adminMapper.updateAdmin(admin);
    }

    @Override
    public List<Admin> findAdminbyid(int id) {
        return adminMapper.findAdminbyid(id);
    }

    @Override
    public List<Admin> findAllAdmin(AdminVo adminVo) {
        return adminMapper.findAllAdmin(adminVo);
    }

    @Override
    public int deleteadmin(int id) {
        return adminMapper.deleteadmin(id);
    }

    @Override
    public int addadmin(Admin admin) {
        return adminMapper.addadmin(admin);
    }
}
